{extend name="layout/layout" /}

{block name="content"}
<div class="row js-check-wrap">
    <div class="col-lg-12">
        <div class="portlet light">
            <div class="box-header">
                <div class="row">
                    {include file="common:searcharea2" /}
                    <div class="col-md-2">
                        <div class="pull-right">
                            <a href="{:url('admin/'.strtolower($model).'/add')}" class="btn blue btn-circle"><i class="fa fa-plus"></i> 添加</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="portlet-body">
                <form class="js-ajax-form" method="post">
                    <div class="">
                        <table id="data-table" class="table table-bordered table-hover dataTable">
                            <thead>
                                <th>图片</th>
                                <th>专题名称</th>
                                <th>排序</th>
                                <th>操作</th>
                            </thead>
                        </table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 分类 模态框 -->
<div class="modal fade" id="type-modal" data-backdrop="static" data-keyboard="false" >
    <div class="modal-dialog" style="width:800px; height: 520px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">x</button>
                <h4 class="modal-title">设置专题分类</h4>
            </div>
            <div class="modal-body">
                <table id="type-datatable" class="table table-bordered table-hover dataTable">
                    <thead>
                    <th>分类名称</th>
                    <th>操作</th>
                    </thead>
                </table>

                <input type="hidden" class="specialtopicId" name="specialtopicId" value="" >
            </div>
            <div class="modal-footer">
                <button type="button" class="btn blue addType-btn"> 新增分类 </button>
                <button type="button" class="btn default" data-dismiss="modal"> 关闭 </button>
            </div>
        </div>
    </div>
</div>

<input type="hidden" class="datalist_url" value="{:url('admin/'.strtolower($model).'/index')}">
<input type="hidden" class="edit_url" value="{:url('admin/'.strtolower($model).'/edit')}">
<input type="hidden" class="delete_url" value="{:url('admin/'.strtolower($model).'/delete')}">

<input type="hidden" class="typeDatalist_url" value="{:url('admin/'.strtolower($model).'/getTypeDatalist')}">
<input type="hidden" class="saveType_url" value="{:url('admin/'.strtolower($model).'/saveType')}">
<input type="hidden" class="delType_url" value="{:url('admin/'.strtolower($model).'/delType')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/pages/js/specialtopic.js" type="text/javascript"></script>
{/block}